.class public Les/pp;
.super Ljava/lang/Object;
.source "ResidentToolEnableNotification.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/pp$b;
    }
.end annotation


# instance fields
.field protected a:Landroid/content/Context;

.field private b:Landroid/app/NotificationManager;

.field private c:Les/pp$b;

.field private d:Ljava/lang/Runnable;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Les/pp$a;

    invoke-direct {v0, p0}, Les/pp$a;-><init>(Les/pp;)V

    iput-object v0, p0, Les/pp;->d:Ljava/lang/Runnable;

    .line 3
    iput-object p1, p0, Les/pp;->a:Landroid/content/Context;

    const-string v0, "notification"

    .line 4
    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/app/NotificationManager;

    iput-object p1, p0, Les/pp;->b:Landroid/app/NotificationManager;

    .line 5
    new-instance p1, Les/pp$b;

    const/4 v0, 0x0

    invoke-direct {p1, p0, v0}, Les/pp$b;-><init>(Les/pp;Les/pp$a;)V

    iput-object p1, p0, Les/pp;->c:Les/pp$b;

    .line 6
    new-instance p1, Landroid/content/IntentFilter;

    invoke-direct {p1}, Landroid/content/IntentFilter;-><init>()V

    const-string v0, "com.estrongs.android.pop.app.residenttoolbar.click.intent"

    .line 7
    invoke-virtual {p1, v0}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v0, "com.estrongs.android.pop.app.residenttoolbar.delete.intent"

    .line 8
    invoke-virtual {p1, v0}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 9
    iget-object v0, p0, Les/pp;->a:Landroid/content/Context;

    iget-object v1, p0, Les/pp;->c:Les/pp$b;

    invoke-virtual {v0, v1, p1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    return-void
.end method

.method static synthetic a(Les/pp;Les/pp$b;)Les/pp$b;
    .locals 0

    .line 2
    iput-object p1, p0, Les/pp;->c:Les/pp$b;

    return-object p1
.end method

.method static synthetic a(Les/pp;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/pp;->e()V

    return-void
.end method

.method private b()Landroid/content/Intent;
    .locals 2

    .line 2
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string v1, "com.estrongs.android.pop.app.residenttoolbar.click.intent"

    .line 3
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    return-object v0
.end method

.method static synthetic b(Les/pp;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/pp;->f()V

    return-void
.end method

.method private c()Landroid/content/Intent;
    .locals 2

    .line 2
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string v1, "com.estrongs.android.pop.app.residenttoolbar.delete.intent"

    .line 3
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    return-object v0
.end method

.method static synthetic c(Les/pp;)Les/pp$b;
    .locals 0

    .line 1
    iget-object p0, p0, Les/pp;->c:Les/pp$b;

    return-object p0
.end method

.method private d()Landroid/widget/RemoteViews;
    .locals 4

    .line 2
    new-instance v0, Landroid/widget/RemoteViews;

    iget-object v1, p0, Les/pp;->a:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    const v2, 0x7f0c035a

    invoke-direct {v0, v1, v2}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V

    const v1, 0x7f090d3d

    const-string v2, "setVisibility"

    const/16 v3, 0x8

    .line 3
    invoke-virtual {v0, v1, v2, v3}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V

    .line 4
    iget-object v1, p0, Les/pp;->a:Landroid/content/Context;

    const v2, 0x7f11095b

    .line 5
    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    const v2, 0x7f090d41

    .line 6
    invoke-virtual {v0, v2, v1}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    .line 7
    iget-object v1, p0, Les/pp;->a:Landroid/content/Context;

    const v2, 0x7f11095a

    .line 8
    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    const v2, 0x7f090d40

    .line 9
    invoke-virtual {v0, v2, v1}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    const v1, 0x7f090d3e

    const v2, 0x7f080609

    .line 10
    invoke-virtual {v0, v1, v2}, Landroid/widget/RemoteViews;->setImageViewResource(II)V

    return-object v0
.end method

.method static synthetic d(Les/pp;)Ljava/lang/Runnable;
    .locals 0

    .line 1
    iget-object p0, p0, Les/pp;->d:Ljava/lang/Runnable;

    return-object p0
.end method

.method private e()V
    .locals 3

    .line 1
    :try_start_0
    iget-object v0, p0, Les/pp;->a:Landroid/content/Context;

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    iget-object v0, p0, Les/pp;->c:Les/pp$b;

    if-eqz v0, :cond_0

    .line 2
    iget-object v0, p0, Les/pp;->a:Landroid/content/Context;

    iget-object v2, p0, Les/pp;->c:Les/pp$b;

    invoke-virtual {v0, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 3
    iget-object v0, p0, Les/pp;->a:Landroid/content/Context;

    instance-of v0, v0, Lcom/estrongs/android/pop/FexApplication;

    if-nez v0, :cond_0

    .line 4
    iput-object v1, p0, Les/pp;->a:Landroid/content/Context;

    .line 5
    :cond_0
    iget-object v0, p0, Les/pp;->b:Landroid/app/NotificationManager;

    if-eqz v0, :cond_1

    .line 6
    iget-object v0, p0, Les/pp;->b:Landroid/app/NotificationManager;

    const/16 v2, 0x7c5

    invoke-virtual {v0, v2}, Landroid/app/NotificationManager;->cancel(I)V

    .line 7
    iput-object v1, p0, Les/pp;->b:Landroid/app/NotificationManager;

    .line 8
    :cond_1
    iput-object v1, p0, Les/pp;->c:Les/pp$b;

    .line 9
    invoke-static {}, Lcom/estrongs/android/util/o0;->a()Landroid/os/Handler;

    move-result-object v0

    iget-object v1, p0, Les/pp;->d:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 10
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :goto_0
    return-void
.end method

.method private f()V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/pp;->e()V

    return-void
.end method

.method private g()V
    .locals 4

    .line 1
    invoke-static {}, Lcom/estrongs/android/util/o0;->a()Landroid/os/Handler;

    move-result-object v0

    iget-object v1, p0, Les/pp;->d:Ljava/lang/Runnable;

    const-wide/16 v2, 0xfa0

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    return-void
.end method


# virtual methods
.method public a()V
    .locals 6

    .line 3
    iget-object v0, p0, Les/pp;->b:Landroid/app/NotificationManager;

    const/16 v1, 0x7c5

    invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->cancel(I)V

    .line 4
    iget-object v0, p0, Les/pp;->a:Landroid/content/Context;

    invoke-direct {p0}, Les/pp;->b()Landroid/content/Intent;

    move-result-object v2

    const/high16 v3, 0x10000000

    invoke-static {v0, v1, v2, v3}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    .line 5
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v2

    invoke-static {v2}, Les/dh0;->a(Landroid/app/Application;)Les/dh0;

    move-result-object v2

    const-string v4, "general_remind"

    .line 6
    invoke-virtual {v2, v4}, Les/dh0;->a(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v2

    const/4 v4, 0x1

    .line 7
    invoke-virtual {v2, v4}, Landroidx/core/app/NotificationCompat$Builder;->setVisibility(I)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v2

    const v5, 0x7f0807af

    .line 8
    invoke-virtual {v2, v5}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v2

    .line 9
    invoke-direct {p0}, Les/pp;->d()Landroid/widget/RemoteViews;

    move-result-object v5

    invoke-virtual {v2, v5}, Landroidx/core/app/NotificationCompat$Builder;->setCustomContentView(Landroid/widget/RemoteViews;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v2

    .line 10
    invoke-virtual {v2, v4}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v2

    iget-object v4, p0, Les/pp;->a:Landroid/content/Context;

    .line 11
    invoke-direct {p0}, Les/pp;->c()Landroid/content/Intent;

    move-result-object v5

    invoke-static {v4, v1, v5, v3}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroidx/core/app/NotificationCompat$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v2

    .line 12
    invoke-virtual {v2, v0}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    .line 13
    iget-object v2, p0, Les/pp;->b:Landroid/app/NotificationManager;

    invoke-virtual {v0}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;

    move-result-object v0

    invoke-virtual {v2, v1, v0}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    .line 14
    invoke-direct {p0}, Les/pp;->g()V

    return-void
.end method
